/* License Notice:
**
** This program is free software: you can redistribute it and/or modify
**    it under the terms of the GNU General Public License as published by
**    the Free Software Foundation, either version 3 of the License, or
**    (at your option) any later version.
** This program is distributed in the hope that it will be useful,
**   but WITHOUT ANY WARRANTY; without even the implied warranty of
**   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
**   GNU General Public License for more details.
** You should have received a copy of the GNU General Public License
**   along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

/**
 * @file effect_sources.hpp
 * @author TooOld2Rock'nRoll
 * @date 2024/09/02
 * @brief Implements Audio Sources for Effect Containers.
 */
#ifndef _EFFECT_SOURCES_HPP_
#define _EFFECT_SOURCES_HPP_

/*---- Includes ----*/
#include "audio_interfaces.hpp"


/*---- Class Declaration ----*/
/**
 * @brief Mix_Chunk data source.
 * A Sound Source that is (preferably) short and uncompressed.<br>
 * This kind of source is decoded on load, therefore the suggestion for it to be uncompressed.<br>
 * It also takes more memory, therefore the suggestion to be short.<br>
 * Accepts any of the audio formats configured by the Audio API on compilation time.
 */
class DecodedFileSource : public AudioSourceData<Mix_Chunk *>
{
    public:
        explicit DecodedFileSource (const char *file_path);
        /** @brief Destructor. */
        virtual ~DecodedFileSource () { Mix_FreeChunk (this->p_native_audio_data); };

        virtual void setVol (unsigned short volume) override final;
};//END DecodedFileSource

#endif //_EFFECT_SOURCES_HPP_

